/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ADMIN
 */
@Entity
@Table(name = "formadepago", catalog = "SIESCO", schema = "dbo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Formadepago.findAll", query = "SELECT f FROM Formadepago f"),
    @NamedQuery(name = "Formadepago.findByIdformapago", query = "SELECT f FROM Formadepago f WHERE f.idformapago = :idformapago"),
    @NamedQuery(name = "Formadepago.findByTipoformapago", query = "SELECT f FROM Formadepago f WHERE f.tipoformapago = :tipoformapago")})
public class Formadepago implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "idformapago", nullable = false)
    private Integer idformapago;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 25)
    @Column(name = "tipoformapago", nullable = false, length = 25)
    private String tipoformapago;

    public Formadepago() {
    }

    public Formadepago(Integer idformapago) {
        this.idformapago = idformapago;
    }

    public Formadepago(Integer idformapago, String tipoformapago) {
        this.idformapago = idformapago;
        this.tipoformapago = tipoformapago;
    }

    public Integer getIdformapago() {
        return idformapago;
    }

    public void setIdformapago(Integer idformapago) {
        this.idformapago = idformapago;
    }

    public String getTipoformapago() {
        return tipoformapago;
    }

    public void setTipoformapago(String tipoformapago) {
        this.tipoformapago = tipoformapago;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idformapago != null ? idformapago.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Formadepago)) {
            return false;
        }
        Formadepago other = (Formadepago) object;
        if ((this.idformapago == null && other.idformapago != null) || (this.idformapago != null && !this.idformapago.equals(other.idformapago))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Formadepago[ idformapago=" + idformapago + " ]";
    }
    
}
